<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  //请求用户名 请求密码 请求年龄
   const p1 = new Promise((resolve,reject)=>{
    // resolve(`成功`)
    try{
      // throw new Error(`抛出异常`)
      console.log(`开始请求用户名`);
      setTimeout(()=>{
        reject(``)
      },2500)
    }catch(e){
      console.log(e.message);
    }
  })
  console.log(`p1`);
  const p2 =p1.then((value)=>{
    
  })
  .then((value)=>{

  })
</script>
</html>